{extend name="$_admin_base_layout" /}

{block name="content"}

        <div class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="block">
                        <div class="block-content tab-content">
                            <div class="tab-pane active">
                                <div class="table-responsive">
                                    <table class="table table-builder table-hover table-bordered table-striped js-table-checkable " style="table-layout:fixed;">
                                        <thead>
                                            <tr>
                                                <th colspan="6">基本信息</th>
											</tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <th>订单号</th>
                                                <td>{$data.base.order_no}</td>
                                                <th>订单状态</th>
                                                <td>{$data.base.order_status_text}</td>
                                                <th>支付方式</th>
                                                <td>{$data.base.pay_name}</td>
											</tr>
                                            <tr>
                                                <th>下单时间</th>
                                                <td>{$data.base.create_time}</td>
                                                <th>付款时间</th>
                                                <td>{$data.base.pay_time}</td>
                                                <th>发货时间</th>
                                                <td>{$data.base.shipping_time}</td>
											</tr>
                                            <tr>
                                                <th>配送方式</th>
                                                <td>{$data.base.shipping_name}</td>
                                                <th>发货单号</th>
                                                <td>xx</td>
                                                <th>购货人</th>
                                                <td>xx</td>
											</tr>
                                            <tr>
                                                <th>发票</th>
                                                <td>{$data.base.invoice_text}</td>
                                                <th>佣金</th>
                                                <td>{$data.base.commision_money|getPrice}</td>
                                                <th>税额</th>
                                                <td>{$data.base.tax_money|getPrice}</td>
											</tr>
                                            <tr>
                                                <th>结算金额</th>
                                                <td>{$data.base.settle_money|getPrice}</td>
                                                <th></th>
                                                <td></td>
                                                <th></th>
                                                <td></td>
											</tr>
                                        </tbody>
                                    </table>

                                    <table class="table table-builder table-hover table-bordered table-striped js-table-checkable " style="table-layout:fixed;">
                                        <thead>
                                            <tr>
                                                <th colspan="6">收货人信息</th>
											</tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <th>收货人</th>
                                                <td>{$data.consignee.consignee}</td>
                                                <th>电话</th>
                                                <td>{$data.consignee.mobile}</td>
                                                <th>地址</th>
                                                <td>{$data.consignee.province_name}{$data.consignee.city_name}{$data.consignee.district_name}{$data.consignee.address}</td>
											</tr>
                                        </tbody>
                                    </table>

                                    <table class="table table-builder table-hover table-bordered table-striped js-table-checkable " style="table-layout:fixed;">
                                        <thead>
                                            <tr>
                                                <th colspan="14">商品信息</th>
											</tr>
                                        </thead>
                                        <tbody>
											{foreach name="$data.orders" item="m"}
												{if condition="$m.warehouse_id > 0"}<tr><td colspan="14">{$m.order_no},{$m.warehouse_name}</td></tr>{/if}
												{foreach name="$m.subOrders" item="so"}
													<tr><td colspan="14">{$so.order_no},{$so.shop_name}</td></tr>
													{foreach name="$data.goods[$so.order_id]" item="class"}
														{if condition="$class.i eq 0"}
														<tr>
															<th>款名</th>
															<th>商品名称</th>
															<th>SKU</th>
															<th>尺码</th>
															<th>颜色</th>
															<th>税率</th>
															<th>税额</th>
															<th>未税价</th>
															<th>含税价</th>
															<th>佣金</th>
															<th>积分</th>
															<th>优惠券</th>
															<th>数量</th>
															<th>小计</th>
														</tr>
														{/if}
														{foreach name="$class.goods" item="v"}
															<tr>
																{if condition="count($class['goods']) gt 1"}
																	{if condition="$key eq 0"}
																	<td valign="middle" rowspan="<?php echo count($class['goods']); ?>" colspan="1">{$class.class_name}</td>
																	{/if}
																{else/}
																	<td>{$class.class_name}</td>
																{/if}
																<td>{$v.goods_name}</td>
																<td>{$v.goods_sn}</td>
																<td>{$v.size_name}</td>
																<td>{$v.color_name}</td>
																<td>{$v.tax_rate}</td>
																<td>{$v.tax_money}</td>
																<td>{$v.cost_price}</td>
																<td>{$v['goods_price']/100}</td>
																<td>{$v.commision}</td>
																<td>{$v.integral}</td>
																<td>{$v.coupon}</td>
																<td>{$v.goods_num} {$v.unit}</td>
																<td>{$v['total_price']/100}</td>
															</tr>
														{/foreach}
													{/foreach}
												{/foreach}
											{/foreach}
                                        </tbody>
                                    </table>

                                    <table class="table table-builder table-hover table-bordered table-striped js-table-checkable " style="table-layout:fixed;">
                                        <thead>
                                            <tr>
                                                <th colspan="7">费用信息</th>
											</tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <th>货品总价</th><td colspan="6">{$data['base']['goods_price']|getPrice}</td>
											</tr>
                                            <tr>
                                                <th>运费</th><td colspan="6">{$data['base']['shipping_price']|getPrice}</td>
											</tr>
                                            <tr>
                                                <th>积分</th><td colspan="6">{$data['base']['integral']},抵扣现金{$data['base']['integral_money']}</td>
											</tr>
                                            <tr>
                                                <th>余额抵扣</th><td colspan="6">{$data['base']['balance']|getPrice}</td>
											</tr>
                                            <tr>
                                                <th>优惠券抵扣</th><td colspan="6"><?php $coupon = $data['base']['coupon_flat']+$data['base']['coupon_shop'];echo getPrice($coupon); ?></td>
											</tr>
                                            <tr>
                                                <th>价格调整</th><td colspan="6">{$data['base']['adjust']|getPrice}</td>
											</tr>
                                            <tr>
                                                <th>应付</th><td colspan="6">{$data['base']['order_price']|getPrice}</td>
											</tr>
                                            <tr>
                                                <th>订单总价</th><td colspan="6">{$data['base']['total_price']|getPrice}</td>
											</tr>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="data-table-toolbar">
                                    <div class="row">
                                        <div class="col-sm-12"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

{/block}